package com.otitan.la.forest.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.otitan.la.forest.system.dto.UserDTO;
import com.otitan.la.forest.system.entity.UserEntity;
import com.otitan.la.forest.system.vo.UserEntityVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 用户表
 *
 * @author jiacs
 * @email xxx
 * @date 2020-09-15 16:01:53
 */
@Mapper
public interface UserMapper extends BaseMapper<UserEntity> {

    /**
     * 根据用户名和密码查询用户信息
     *
     * @param map
     * @return com.otitan.la.forest.system.entity.UserEntity
     * @throws
     * @author jiachangsen
     * @date 2020/09/17 20:26
     */
    UserEntity findByUserNameAndPassword(Map<String, String> map);

    /**
     * 分页查询用户信息
     * @author jiachangsen
     * @param [user, pagePlug]
     * @return java.util.List<com.otitan.la.forest.system.entity.UserEntity>
     * @exception
     * @date 2020/09/22 10:31
     */
    List<UserEntityVO> findPageData(@Param("user") UserDTO user, Page pagePlug);
}
